//---------------------------------------------------------------------------

#ifndef Unit1H
#define Unit1H
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <Buttons.hpp>
#include <ExtCtrls.hpp>
#include <Graphics.hpp>
#include "my_xml.h"
#include <msxmldom.hpp>
#include <XMLDoc.hpp>
#include <xmldom.hpp>
#include <XMLIntf.hpp>
#ifndef stdioH
#include <stdio.h>
#endif
//---------------------------------------------------------------------------
typedef struct Ctrls
{
   String ctrlName;
   TPoint formPos;
   int width;
   int height;
   bool hasNormal;
   bool hasMouseUp;
   bool hasMouseDown;
   bool hasDisable;
   bool hasFocus;
   TPoint normal;
   TPoint mouseUp;
   TPoint mouseDown;
   TPoint disable;
   TPoint focus;
}m_ctrls;
class TForm1 : public TForm
{
__published:	// IDE-managed Components
        TImage *LoginDlgBG;
        TLabel *Label_UserName;
        TLabel *Label_Password;
        TImage *BMin;
        TImage *BClose;
        TImage *BLogin;
        TImage *BExit;
        TEdit *Edit_UserName;
        TEdit *Edit_Password;
        void __fastcall LoginDlgBGMouseDown(TObject *Sender,
          TMouseButton Button, TShiftState Shift, int X, int Y);
        void __fastcall BCloseClick(TObject *Sender);
        void __fastcall BLoginClick(TObject *Sender);
        void __fastcall BExitClick(TObject *Sender);
        void __fastcall BCloseMouseDown(TObject *Sender,
          TMouseButton Button, TShiftState Shift, int X, int Y);
        void __fastcall BCloseMouseUp(TObject *Sender, TMouseButton Button,
          TShiftState Shift, int X, int Y);
        void __fastcall BCloseMouseMove(TObject *Sender, TShiftState Shift,
          int X, int Y);
        void __fastcall BLoginMouseDown(TObject *Sender,
          TMouseButton Button, TShiftState Shift, int X, int Y);
        void __fastcall BLoginMouseUp(TObject *Sender, TMouseButton Button,
          TShiftState Shift, int X, int Y);
        void __fastcall BExitMouseUp(TObject *Sender, TMouseButton Button,
          TShiftState Shift, int X, int Y);
        void __fastcall BExitMouseDown(TObject *Sender,
          TMouseButton Button, TShiftState Shift, int X, int Y);
        void __fastcall Edit_PasswordKeyDown(TObject *Sender, WORD &Key,
          TShiftState Shift);
        void __fastcall BMinMouseDown(TObject *Sender, TMouseButton Button,
          TShiftState Shift, int X, int Y);
        void __fastcall BMinMouseUp(TObject *Sender, TMouseButton Button,
          TShiftState Shift, int X, int Y);
        void __fastcall BMinClick(TObject *Sender);
        void __fastcall FormCreate(TObject *Sender);
        void __fastcall ComboBox1DrawItem(TWinControl *Control, int Index,
          TRect &Rect, TOwnerDrawState State);
private:	// User declarations
public:		// User declarations
        __fastcall TForm1(TComponent* Owner);
        String xmlString;
        void __fastcall createButtonCtrl(TImage *image ,String ctrlName,String  actionName);
        void __fastcall createEditCtrl(TEdit *edit,String ctrlName);
        void __fastcall createLabelCtrl(TLabel *label ,String ctrlName);
        void __fastcall TForm1::OnMouseMove(TObject *Sender, TShiftState Shift,
      int X, int Y);
       Ctrls   *controls;
       TObject *mouseOverObject, *perObject;
       void __fastcall GetControlInfor();

};
//---------------------------------------------------------------------------
extern PACKAGE TForm1 *Form1;
//---------------------------------------------------------------------------
#endif
